package de.slothsoft.wasbinich.swingclient.database;

import java.util.Map;
import java.util.Map.Entry;

import de.slothsoft.wasbinich.core.database.DatabaseException;

public class DummyRestCommunicator extends JerseyRestCommunicator {

    public DummyRestCommunicator() {
	super(false);
    }

    @Override
    public String post(String url, Map<String, String> parameters) throws DatabaseException {
	System.out.print("Connecting to POST URL: " + url);
	for (Entry<String, String> parameterEntry : parameters.entrySet()) {
	    System.out.print(", " + parameterEntry.getKey() + "=" + parameterEntry.getValue());
	}
	System.out.println();
	return super.post(url, parameters);
    }

    @Override
    public String get(String url) throws DatabaseException {
	System.out.println("Connecting to GET URL: " + url);
	return super.get(url);
    }
}
